﻿using Microsoft.EntityFrameworkCore;
using mozhi.smarterp.Foundation.OperationLogTemplates;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace mozhi.smarterp.Foundation.EntityFrameworkCore;

[ConnectionStringName(FoundationDbProperties.ConnectionStringName)]
public class FoundationDbContext : AbpDbContext<FoundationDbContext>, IFoundationDbContext
{
    /* Add DbSet for each Aggregate Root here. Example:
     * public DbSet<Question> Questions { get; set; }
     */

    public DbSet<OperationLogTemplate> LogTemplates { get; set; }

    public FoundationDbContext(DbContextOptions<FoundationDbContext> options)
        : base(options)
    {

    }

    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);

        builder.ConfigureFoundation();
    }
}
